@isTest
private class AccountsReceivableStatementHandlerTest {
    static testMethod void testMethod1() {

    	Id xsProfile = [Select Id From Profile Where Name like '%销售员%' limit 1 ].Id;
    	Id nxsProfile = [Select Id From Profile Where Name like '%系统%' limit 1 ].Id;

        User u1 = new User( Alias = 'samLdc1', 
                         Email = 'ldc@test.com.maike',
                         Emailencodingkey = 'UTF-8', 
                         Lastname = '用户1', 
                         Languagelocalekey = 'en_US',
                         Localesidkey = 'en_US', 
                         Profileid = xsProfile, 
                         Country = 'United States',
                         IsActive = true,
                         SubCompany__c='四川省迈克实业有限公司',
                         UserDepartment__c='客户服务中心(工程部)',
                         Timezonesidkey = 'America/Los_Angeles', 
                         EmployeeNumber = '123451',
                         Username = 'Matldc1@test.com.maike' );
        insert u1;

          User u2 = new User( Alias = 'samLdc1', 
                         Email = 'ldc@test.com.maike',
                         Emailencodingkey = 'UTF-8', 
                         Lastname = '用户1', 
                         Languagelocalekey = 'en_US',
                         Localesidkey = 'en_US', 
                         Profileid = nxsProfile, 
                         Country = 'United States',
                         IsActive = true,
                         SubCompany__c='四川省迈克实业有限公司',
                         UserDepartment__c='客户服务中心(工程部)',
                         Timezonesidkey = 'America/Los_Angeles', 
                         EmployeeNumber = '123452',
                         Username = 'Matldc2@test.com.maike' );
        insert u2;



        AcceptancePerformance__c ap = new AcceptancePerformance__c();
        ap.OwnerId = u1.Id;

        insert ap;

        AcceptancePerformance__c ap1 = new AcceptancePerformance__c();
        ap1.OwnerId = u2.Id;

        insert ap1;

        AccountsReceivableStatement__c ars = new AccountsReceivableStatement__c();
        ars.AcceptancePerformance__c = ap.Id;

        ars.Over3MonthsOfOverdueDate__c = 30;
        ars.Quarterly__c = '二季度';

        ars.Month__c = '5月';


        insert ars;

        AccountsReceivableStatement__c ars1 = new AccountsReceivableStatement__c();
        ars1.AcceptancePerformance__c = ap1.Id;
        ars1.Over3MonthsOfOverdueDate__c = 30;
        ars1.Quarterly__c = '二季度';

        ars1.Month__c = '5月';

        insert ars1;

        AccountsReceivableStatement__c ars2 = new AccountsReceivableStatement__c();
        ars2.AcceptancePerformance__c = ap1.Id;
        ars2.Over3MonthsOfOverdueDate__c = 30;
        ars2.Quarterly__c = '二季度';

        ars2.Month__c = '5月';

        insert ars2;

    }
}